/**
 * @projectName CollegeEmploymentNetwork
 * @package com.kzj.CollegeEmploymentNetwork.shiro.enums
 * @className com.kzj.CollegeEmploymentNetwork.shiro.enums.UserTypeEnum
 * @copyright Copyright 2025 Thunisoft, Inc All rights reserved.
 */
package com.kzj.CollegeEmploymentNetwork.shiro.enums;

/**
 * UserTypeEnum
 * @description
 * @author KZJ
 * @date 2025/1/24 18:02
 * @version TODO
 */
public enum UserTypeEnum {
    ADMIN("admin","管理员"),
    COMPANY_ADMIN("companyAdmin","公司管理员"),
    CANDIDATE("candidate","应聘者"),
    RECRUITER("recruiter","招聘者");
    private String code;
    private String desc;
    private UserTypeEnum(String code,String desc){
        this.code=code;
        this.desc=desc;
    }
    public boolean is(Object object){
        boolean result=super.equals(object);
        if(result)
            return result;
        else if(object instanceof String)
        {
            return this.code.equals(object);
        }
        return false;
    }
}